package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Menu;
import com.itheima.pojo.Role;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RoleDao {
    List<Role> findAll();

    Page<Role> findByCondition(String queryString);

    void add(Role role);

    void setRoleAndMenu(Map map);

    void setRoleAndPermission(Map map);

    Integer findAssociationWithPer(Integer id);

    Integer findAssociationWithMenu(Integer id);

    void delete(Integer id);

    Role findById(Integer id);

    void edit(Role role);

    void deleteAssociationWithPer(Integer roleId);

    void deleteAssociationWithMenu(Integer roleId);

    Set<Role> findByUserId(Integer userId);

    List<Menu> findMenuByUserId(Integer id);
}
